<ui:fragment
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.prime.com.tr/ui">

    <p:dialog header="#{bundle.Editar_pessoa}" draggable="true" widgetVar="pessoa_edit">
        <h:form id="pessoa_editF">
            <p:messages id="msgs"/>
            <h:panelGrid columns="2" style="width:100%;text-align:left;">
                <h:outputLabel value="#{bundle.ID}" />
                <h:outputText value="#{pessoaController.pessoa.id}" />
                <h:outputLabel value="#{bundle.Nome}" />
                <h:inputText value="#{pessoaController.pessoa.nome}"/>
                <h:outputLabel value="#{bundle.Email}" />
                <h:inputText value="#{pessoaController.pessoa.email}"/>
            </h:panelGrid>
            <h:panelGrid columns="2" width="100%">
                <p:commandButton value="#{bundle.Salvar}"  action="#{pessoaController.EditarPessoa}" ajax="true" update="pessoa_editF"/>
                <p:commandButton value="#{bundle.Cancelar}" action="#{pessoaController.NovaPessoa}"  ajax="true" onclick="pessoa_edit.hide();" update="pessoa_editF" />
            </h:panelGrid>
        </h:form>
    </p:dialog>
</ui:fragment>